﻿<%@ Page Language="C#" MasterPageFile="~/parents/pmaster.Master" AutoEventWireup="true" CodeBehind="PProfile.aspx.cs" Inherits="ESCHOOL.parents.WebForm2" Title="Parent Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style4
        {
            text-align: left;
        }
        .style5
        {
            text-align: left;
            width: 186px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

                
    <br />
    <table class="style1">
        <tr>
            <td>
                <asp:Panel ID="Panel1" runat="server">
                    <table class="style1">
                        <tr>
                            <td style="text-align: left">
                                <table class="style3">
                                    <tr>
                                        <td class="style5">
                                            &nbsp;</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbparid" runat="server" Visible="False"></asp:TextBox>
                                            <asp:TextBox ID="tbstudid" runat="server" Visible="False"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Father Name</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbfname" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="tbfname" ErrorMessage="Plz  enter full name"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Mother Name</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbmname" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                ControlToValidate="tbmname" ErrorMessage="Plz enter full name"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Father Qualification</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbfquali" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                ControlToValidate="tbfquali" ErrorMessage="Plz enter valid info"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Mother Qualification</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbmquali" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                                ControlToValidate="tbmquali" ErrorMessage="Plz enter valid info"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Father Occupation</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbfoccu" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                                ControlToValidate="tbfoccu" ErrorMessage="plz enter"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Mother Occupation</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbmoccu" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                                ControlToValidate="tbmoccu" ErrorMessage="plz enter"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Address</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbaddress" runat="server"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                                ControlToValidate="tbaddress" ErrorMessage="Enter full address"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Phone No.</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbpno" runat="server"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                ControlToValidate="tbpno" ErrorMessage="Enter 10 digit,start with 0" 
                                                ValidationExpression="(0\d{9})"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Email id</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbemail" runat="server"></asp:TextBox>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                                ControlToValidate="tbemail" ErrorMessage="ex(abc@gmail.com)" 
                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            User Type</td>
                                        <td class="style4">
                                            <asp:DropDownList ID="dduser" runat="server">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Security Question</td>
                                        <td class="style4">
                                            <asp:DropDownList ID="ddquestion" runat="server" 
                                                onselectedindexchanged="ddquestion_SelectedIndexChanged">
                                                <asp:ListItem>-</asp:ListItem>
                                                <asp:ListItem>Who is your best friend?</asp:ListItem>
                                                <asp:ListItem>Which is your birth place?</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Answer</td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbanswer" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            <asp:Label ID="labuname" runat="server" Text="Username" Visible="False"></asp:Label>
                                        </td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbusername" runat="server" Visible="False"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            <asp:Label ID="labpass" runat="server" Text="Password" Visible="False"></asp:Label>
                                        </td>
                                        <td class="style4">
                                            <asp:TextBox ID="tbpassword" runat="server" Visible="False"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            &nbsp;</td>
                                        <td class="style4">
                                            <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                                                Text="Update" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            &nbsp;</td>
                                        <td class="style4">
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </td>
        </tr>
    </table>
    <p>
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            Height="50px" Width="357px" onmodechanging="DetailsView1_ModeChanging">
            <Fields>
                <asp:BoundField DataField="father_name" HeaderText="Father Name" />
                <asp:BoundField DataField="mother_name" HeaderText="Mother Name" />
                <asp:BoundField DataField="father_qualification" 
                    HeaderText="Father Qualification" />
                <asp:BoundField DataField="mother_qualification" 
                    HeaderText="Mother Qualification" />
                <asp:BoundField DataField="father_occupation" HeaderText="Father Occupation" />
                <asp:BoundField DataField="mother_occupation" HeaderText="Mother Occupation" />
                <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                <asp:BoundField DataField="phone_no" HeaderText="Contact No" />
                <asp:BoundField DataField="parent_emailid" HeaderText="emailid" />
                <asp:BoundField DataField="username" HeaderText="Username" />
                <asp:BoundField DataField="password" HeaderText="Password" />
                <asp:BoundField DataField="security_question" HeaderText="Security Question" />
                <asp:BoundField DataField="answer" HeaderText="Answer" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:Button ID="btnedit" runat="server" 
                            CommandArgument='<%# Eval("parent_id") %>' CommandName="Edit" 
                            oncommand="btnedit_Command" Text="Edit" CausesValidation="False" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
        <br />
    </p>

                
</asp:Content>

